home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Linux / Kubuntu 8.10 / kubuntu-8.10-desktop-i386.iso / casper / filesystem.squashfs / usr / share / system-config-printer / config.pyc (.txt) < prev    next >
Python Compiled Bytecode  |  2008-10-29  |  1KB  |  42 lines

  1. # Source Generated with Decompyle++
  2. # File: in.pyc (Python 2.5)
  3.  
  4. prefix = '/usr'
  5. datadir = '${prefix}/share'
  6. pkgdatadir = '${datadir}/${PACKAGE}'
  7. VERSION = '1.0.5'
  8. PACKAGE = 'system-config-printer'
  9. DOWNLOADABLE_DRIVER_SUPPORT = False
  10. import os
  11.  
  12. class Paths:
  13.     
  14.     def __init__(self):
  15.         vars = [
  16.             'prefix',
  17.             'datadir',
  18.             'pkgdatadir',
  19.             'VERSION',
  20.             'PACKAGE']
  21.         for var in vars:
  22.             os.environ[var] = eval(var)
  23.         
  24.         self.paths = { }
  25.         changed = True
  26.         while changed:
  27.             changed = False
  28.             for var in vars:
  29.                 old = self.paths.get(var, None)
  30.                 self.paths[var] = os.path.expandvars(os.environ[var])
  31.                 os.environ[var] = self.paths[var]
  32.                 if old != self.paths[var]:
  33.                     changed = True
  34.                     continue
  35.             
  36.  
  37.     
  38.     def get_path(self, var):
  39.         return self.paths[var]
  40.  
  41.  
  42.